<div id="newsHeader">
	<h3>TRANG CHỦ<img src="styles/images/baner-marker-active.gif" class="map">TIN TỨC</h3>
</div>
<div id="newsContainer">
    <?php foreach($news as $key => $value){?>
    <fieldset class="newsContainer">
               	<legend><?=stripslashes($value->Title);?></legend>
                 <p><?=stripslashes($value->Description);?></p>
                                        <i>Ngày đăng : <?=stripslashes($value->CreateDate);?></i>
    </fieldset>
    <?    
    }
    if($total > 1){
    ?>
    <div class="pageContainer">
		<a onclick="viewNews(1);"><img src="styles/images/arrow1.gif"><img src="styles/images/arrow1.gif"> Đầu</a>
		<a onclick="viewNews(<?if($page > 1): echo $page-1; else: echo '1'; endif;?>);"><img src="styles/images/arrow1.gif"> Lùi</a>
		<a class="current" onclick="viewNews(<?=$page;?>);"><?=$page;?></a>
                <?php if($page + 1 < $total2){ ?> 
                <a onclick="viewNews(<?=$page + 1;?>);"><?=$page + 1;?></a>
                <? } ?>
                <?php if($page + 2 < $total2){ ?> 
                <a onclick="viewNews(<?=$page + 2;?>);"><?=$page + 2;?></a>
                <? } ?>
                <?php if(($total2 - 1 > 0) && ($page + 1 <= $total2)){ ?> 
                <a onclick="viewNews(<?=$page + 1?>);">Tới <img src="styles/images/arrow.gif"></a>
		<a onclick="viewNews(<?=$total2?>);">Cuối <img src="styles/images/arrow.gif"><img src="styles/images/arrow.gif"></a>
                <? } ?>
    </div>
    <? } ?>
</div>